package com.example.abstractfactory;

import com.example.abstractfactory.shape.Shape;
import java.util.Objects;
import org.junit.jupiter.api.Test;

/**
 * @Description TODO
 * @Date 2021/10/21 14:25
 * @Author ZhangJi
 * @Version 1.0
 */
public class AbstractFactoryPatternTest {

  @Test
  public void abstractFactoryPatternTest(){
    Objects.requireNonNull(FactoryProducer.getFactory("shape"))
        .getShape("Rectangle").draw();
    Objects.requireNonNull(FactoryProducer.getFactory("color"))
        .getColor("Red").fill();
  }

}
